#!/bin/bash
#curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
#echo "deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main" >> /etc/apt/sources.list
#apt update
#apt install gitlab-ce -y
#sudo gitlab-ctl reconfigure

# 如果版本过高

# 使用下面命令
if [ ! -d "/opt/source" ]; then
 mkdir -p /opt/source
fi
cd /opt/source
if [ ! -f /opt/source/gitlab-12-3-stable-zh.tar.gz ]; then
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/xenial/main/g/gitlab-ce/gitlab-ce_12.3.4-ce.0_amd64.deb
fi
sudo dpkg -i /opt/source/gitlab-ce_12.3.4-ce.0_amd64.deb
